Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Mumps-src
Mumps-src
crate is a *-src crate. This links Mumps libraries to executable build by cargo, but does not provide Rust bindings. Mumps is built with OpenBLAS (openblas-src)(Optional) or Intel-MKL (intel-mkl-src)(Optional).
By this package, you don't need to worry about installing Mumps in the system, and it's a package for all platforms(linux).
Mumps (MUltifrontal Massively Parallel sparse direct Solver) is is a package for solving systems of linear equations of the form Ax = b, where A is a square sparse matrix that can be either unsymmetric, symmetric positive definite, or general symmetric, on distributed memory computers.
Note: Only sequential version is supported now. And Metis
is not supported now.
Usage
-
Add the following to your
Cargo.toml
:[] = "\*"
-
Add the following to your
lib.rs
:
This package does not provide bindings.
Configure
Features
The following Cargo features are supported:
default
toopenblas-static
feature andd_arith
feature;
At least 1 following feature need to be selected:
openblas-system
to link to OpenBLAS system library;openblas-static
to link to OpenBLAS statically;intel-mkl-system
to link to intel-mkl system library;intel-mkl-static
to link to intel-mkl statically;
There's 4 kinds of precision for mumps, and at least 1 following feature need to be selected:
s_arith
single, real, precision;d_arith
double, real, precision;c_arith
single, complex, precision;z_arith
double, complex, precision;
Environment
The package build from the source and link statically by default. It also provide the following environment variables to allow users to link to system library customly:
CARGO_MUMPS_STATIC
to link to Mumps statically;CARGO_MUMPS_SYSTEM
to link to Mumps system library;
Set the environment variable to 1
to enable the feature. For example, to link to system library dynamically, set CARGO_${LIB_NAME}_SYSTEM
to 1
; to link to system library statically, set both CARGO_${LIB_NAME}_SYSTEM
and CARGO_${LIB_NAME}_STATIC
to 1
.
If you enable OpenBLAS(openblas-src), you can also pass env to make
by OPENBLAS_*
. Read more at here
Others
If you enable OpenBLAS(openblas-src), you can link OpenBLAS
staticaly or dynamicly by disable default feature and select what you like, for example:
= { = "\*", = no, = ["d_arith", "openblas-system"] }
Similarly, you can link Intel MKL(intel-mkl-src) with:
= { = "\*", = no, = ["d_arith", "intel-mkl-system"] }
If you want more configuration, you can try this:
= { = "\*", = no, = ["d_arith"] }
= { = "\*", = ["mkl-static-lp64-seq"] }
Cross Compilation
If you use OpenBLAS(openblas-src), you need to set OPENBLAS_CC
, OPENBLAS_FC
, OPENBLAS_HOSTCC
, and OPENBLAS_TARGET
to pass env to OpenBLAS, ref:openblas-src and OpenBLAS. For example:
You can compile it for the other target by providing the --target
option to cargo build
.
Target | supported |
---|---|
arm-unknown-linux-gnueabi |
✓ |
arm-unknown-linux-gnueabihf |
✓ |
armv7-unknown-linux-gnueabi |
✓ |
armv7-unknown-linux-gnueabihf |
✓ |
armv7-unknown-linux-musleabi |
✓ |
armv7-unknown-linux-musleabihf |
✓ |
aarch64-unknown-linux-gnu |
✓ |
aarch64-unknown-linux-musl |
✓ |
riscv64gc-unknown-linux-gnu |
✓ |
x86_64-ps-windows-msvc |
✓ |
x86_64-unknown-linux-gnu |
✓ |
x86_64-unknown-linux-musl |
✓ |
others | not test |
Note: Features intel-mkl-*
can only be used for x86_64-*
. Features openblas-static
can only be used for linux
.
Contribution
Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.